import axios from 'axios';
import Vue from 'vue';

axios.interceptors.request.use((config) => {
    const token = window.sessionStorage.getItem('token');
    if (token) config.headers.token = token;
    return config;
});

axios.interceptors.response.use((res) => {
    return res.data;
});

Vue.prototype.$http = axios;
